package com.java.business.controller;

import com.java.business.model.ChargeBill;
import com.java.business.service.ChargeBillService;
import com.java.common.model.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 接待登记
 */
@RestController
@RequestMapping("/chargeBill")
public class ChargeBillController {

    @Autowired
    private ChargeBillService chargeBillService;

    @PostMapping("/list")
    public Result list(@RequestBody ChargeBill chargeBill) {
        return chargeBillService.list(chargeBill);
    }

    @PostMapping("/save")
    public Result save(@RequestBody ChargeBill chargeBill) {
        return chargeBillService.save(chargeBill);
    }

    @PostMapping("/ToSave")
    public Result ToSave(@RequestBody ChargeBill chargeBill) {
        return chargeBillService.ToSave(chargeBill);
    }

    @PostMapping("/modify")
    public Result modify(@RequestBody ChargeBill chargeBill) {
        return chargeBillService.modify(chargeBill);
    }

    @GetMapping("/remove")
    public Result remove(int[] ids) {
        return chargeBillService.remove(ids);
    }

}
